//导入所需模块
import Vue from 'vue'
import App from './App'
import router from './router'
Vue.config.productionTip = false

//ajax
import axios from 'axios'

import VueAxios from 'vue-axios'
Vue.use(VueAxios, axios)

//状态管理
import vuex from 'vuex'
Vue.use(vuex);

//ui 框架
import Vant from 'vant';
import 'vant/lib/index.css';
Vue.use(Vant);

import moment from 'moment';
import _ from 'lodash';
import FastClick from 'fastclick';

//懒加载
import { Lazyload } from 'vant';
Vue.use(Lazyload);

import store from './store/index'

//axios
import {post,fetch,patch,put} from './utils/http'
//定义全局变量
Vue.prototype.$post=post;
Vue.prototype.$fetch=fetch;
Vue.prototype.$patch=patch;
Vue.prototype.$put=put;

//微信登录插件
import wechatAuth from './utils/wechatAuth'
Vue.use(wechatAuth, {appid: "XXXXXXXXX"});

FastClick.attach(document.body);


/* VUE实例 */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
